﻿using System;
using Gammar.Price.ObjectModel;
using Gammar.Price.Business;

public partial class UserControls_Header : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string guid = this.Request["cid"];
        Guid? cid = null;
        try
        {
            if (!string.IsNullOrEmpty(guid))
            {
                Sp_CategoryEntity entity = CategoryLogic.RetrieveCategoryByGuid(new Guid(guid));
                if (entity != null)
                {
                    cid = entity.CClass_ID;
                }
            }
        }
        catch
        {

        }
        finally
        {
            HomePage = CategoryLogic.RetrieveHomeLinkByCategoryId(cid);
        }
    }

    private string _homePage;
    protected string HomePage { get { return _homePage; } set { _homePage = value; } }
}
